/******************************************************************************
* AIR SYSTEMS LABORATORY
* AEROSPACE ENGINEERING
* UNIVERISTY OF TEXAS AT AUSTIN
* UAV FLIGHT SOFTWARE 
* DESCRIPTION:
*   
*
* SOURCE: 
* Orignial: 08/14/2008  Jorge Alvarez joroge@gmail.com
* Modified: 03/20/2009	Sergio García-Nieto sergarro@isa.upv.es
* $Id: adc.h 4 2009-07-21 17:12:11Z joroge@gmail.com $
*************************************************************************************/
#ifndef ADC_H_
#define ADC_H_

#include "globaldefs.h"

#define SYNC0 0x81
#define SYNC1 0xA1
#define ADC_PACKET_ID 0x01
#define ADC_PAYLOAD 0x16+0x6
#define CS0 0x01
#define CS1	0x02
#define ADC_PACKET_LENGTH	28

void adcInitialization();
void adcRequest(int sPort);
void adcAcquisition(int sPort,struct adc *adcpacket);
int checksumCheckADC(byte* buffer, int packet_len);
struct adc *decodeADCpacket(struct adc *data, byte* buffer);

#endif /*ADC_H_*/
